using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HeresyManager.Maligancies
{
    [Serializable]
    public class MaligancyPalsy : Maligancy
    {

        private int reduceedBy;

        public override string Name
        {
            get { return "Palsy"; }
        }
        public override IEnumerator<Comunication.Comunicator> Accire(Character c)
        {
            var en = base.Accire(c);
            while (en.MoveNext())
                yield return en.Current;
            var role = new Comunication.RoleDice("Reduce Agility", Dice.D10);
            while (role.Value == -1)
                yield return role;
            reduceedBy = role.Value;
            c.Ag -= reduceedBy;
        }

        public override void DeAccire(Character c)
        {
            base.DeAccire(c);
            c.Ag += reduceedBy;

        }


        public override int MinRole
        {
            get { return 1; }
        }

        public override int MaxRole
        {
            get { return 10; }
        }
    }
}
